gtk4.git
5 years agoMerge branch 'cups-build-fix' into 'master'
Matthias Clasen [Fri, 31 Jul 2020 16:33:46 +0000 (16:33 +0000)]
Merge branch 'cups-build-fix' into 'master'

Fix the build with cups < 2.3

Closes #2968

See merge request GNOME/gtk!2329

5 years agoFix the build with cups < 2.3
Matthias Clasen [Fri, 31 Jul 2020 14:00:20 +0000 (10:00 -0400)]
Fix the build with cups < 2.3

PPD_CUSTOM_UNKNOWN was introduced in cups 2.3.
Only handle it when we build against a new enough cups.

Fixes: #2968
5 years agoUpdate Romanian translation
Florentina Mușat [Fri, 31 Jul 2020 13:42:35 +0000 (13:42 +0000)]
Update Romanian translation

5 years agoUpdate Ukrainian translation
Yuri Chornoivan [Fri, 31 Jul 2020 12:52:54 +0000 (12:52 +0000)]
Update Ukrainian translation

5 years agoUpdated Spanish translation
Daniel Mustieles [Fri, 31 Jul 2020 11:48:24 +0000 (13:48 +0200)]
Updated Spanish translation

5 years ago3.99.0
Matthias Clasen [Thu, 30 Jul 2020 12:36:01 +0000 (08:36 -0400)]
3.99.0

5 years agotestsuite: Use Wayland by default
Matthias Clasen [Fri, 31 Jul 2020 02:15:56 +0000 (22:15 -0400)]
testsuite: Use Wayland by default

I'm tired of xwayland crashing and killing my shell.

5 years agoMerge branch 'focus-active' into 'master'
Matthias Clasen [Thu, 30 Jul 2020 17:50:54 +0000 (17:50 +0000)]
Merge branch 'focus-active' into 'master'

Focus active

Closes #2390

See merge request GNOME/gtk!2324

5 years agoeventcontrollerkey: Update im focus when active window changes
Matthias Clasen [Thu, 30 Jul 2020 17:23:45 +0000 (13:23 -0400)]
eventcontrollerkey: Update im focus when active window changes

Use the new GTK_CROSSING_ACTIVE crossing events to update
the im context focus when the window becomes active or
inactive. IBus requires this, since it has only a single,
global focus location.

Fixes: #2390
5 years agowindow: Emit GTK_CROSSING_ACTIVE crossing events
Matthias Clasen [Thu, 30 Jul 2020 17:22:26 +0000 (13:22 -0400)]
window: Emit GTK_CROSSING_ACTIVE crossing events

Emit crossing events when the active window changes.
We don't want to emit GTK_CROSSING_FOCUS events, since
every window has its own focus location (focus does not
jump from window to window), so we use the new
GTK_CROSSING_ACTIVE type of crossing event for this.

5 years agoDefine GTK_CROSSING_ACTIVE
Matthias Clasen [Thu, 30 Jul 2020 17:21:28 +0000 (13:21 -0400)]
Define GTK_CROSSING_ACTIVE

Document the different crossing event kinds that we use,
and add GTK_CROSSING_ACTIVE. We are going to use it in
the future when the active window changes.

5 years agoMerge branch 'wip/carlosg/more-device-api-cleanup' into 'master'
Matthias Clasen [Thu, 30 Jul 2020 17:01:15 +0000 (17:01 +0000)]
Merge branch 'wip/carlosg/more-device-api-cleanup' into 'master'

More device API cleanup

See merge request GNOME/gtk!2323

5 years agogdk: Rename gdk_seat_get_physical_devices() to gdk_seat_get_devices()
Carlos Garnacho [Thu, 30 Jul 2020 15:52:28 +0000 (17:52 +0200)]
gdk: Rename gdk_seat_get_physical_devices() to gdk_seat_get_devices()

We don't want to tell what they are, and the distinction is now less
clear. Remove the adjective from the function name.

5 years agogdk: Drop gdk_device_get_device_type()
Carlos Garnacho [Thu, 30 Jul 2020 15:46:49 +0000 (17:46 +0200)]
gdk: Drop gdk_device_get_device_type()

There is no longer a hierarchy of devices, or none that is seen
on the outside.

5 years agogdk/x11: Make device type a X11 detail
Carlos Garnacho [Thu, 30 Jul 2020 15:37:19 +0000 (17:37 +0200)]
gdk/x11: Make device type a X11 detail

The only legit uses of device types are here in gdk/x11, move the
concept of device type to X11, so we can drop it from public API.

5 years agogdk: Make gdk_device_list_physical_devices() private
Carlos Garnacho [Thu, 30 Jul 2020 15:15:14 +0000 (17:15 +0200)]
gdk: Make gdk_device_list_physical_devices() private

Physical devices should probably be accounted internally in gdk/x11,
make this out of private API so at least the implementation details
don't leak.

5 years agogdk: Drop gdk_device_get_associated_device()
Carlos Garnacho [Thu, 30 Jul 2020 12:30:57 +0000 (14:30 +0200)]
gdk: Drop gdk_device_get_associated_device()

Devices are no longer associated like this, the seat should be used
to resolve queries on other devices.

5 years agogtkimcontext: Avoid gdk_device_get_associated_device()
Carlos Garnacho [Thu, 30 Jul 2020 12:29:24 +0000 (14:29 +0200)]
gtkimcontext: Avoid gdk_device_get_associated_device()

Query the seat for that.

5 years agogtktextview: Avoid gdk_device_get_associated_device()
Carlos Garnacho [Thu, 30 Jul 2020 12:29:12 +0000 (14:29 +0200)]
gtktextview: Avoid gdk_device_get_associated_device()

Query the seat for that.

5 years agogtkwindowhandle: Avoid gdk_device_get_associated_device()
Carlos Garnacho [Thu, 30 Jul 2020 12:28:59 +0000 (14:28 +0200)]
gtkwindowhandle: Avoid gdk_device_get_associated_device()

Query the seat for that.

5 years agogtkdragsource: Avoid gdk_device_get_associated_device()
Carlos Garnacho [Thu, 30 Jul 2020 12:28:45 +0000 (14:28 +0200)]
gtkdragsource: Avoid gdk_device_get_associated_device()

Query the seat for that.

5 years agogdk/x11: Avoid gdk_device_get_associated_device()
Carlos Garnacho [Thu, 30 Jul 2020 12:28:15 +0000 (14:28 +0200)]
gdk/x11: Avoid gdk_device_get_associated_device()

Query the seat for that.

5 years agogdk/win32: Avoid gdk_device_get_associated_device()
Carlos Garnacho [Thu, 30 Jul 2020 12:27:46 +0000 (14:27 +0200)]
gdk/win32: Avoid gdk_device_get_associated_device()

Query the seat for that.

5 years agogdk/macos: Avoid gdk_device_get_associated_device()
Carlos Garnacho [Thu, 30 Jul 2020 12:27:25 +0000 (14:27 +0200)]
gdk/macos: Avoid gdk_device_get_associated_device()

Query the seat for that.

5 years agogdk: Avoid gdk_device_get_associated_device()
Carlos Garnacho [Thu, 30 Jul 2020 12:26:51 +0000 (14:26 +0200)]
gdk: Avoid gdk_device_get_associated_device()

Query the seat for that.

5 years agoMerge branch 'wip/otte/geometry' into 'master'
Benjamin Otte [Thu, 30 Jul 2020 15:31:27 +0000 (15:31 +0000)]
Merge branch 'wip/otte/geometry' into 'master'

Some GdkGeometry cleanups

See merge request GNOME/gtk!2322

5 years agoRemove unused GDK_HINT_POS
Benjamin Otte [Thu, 30 Jul 2020 15:05:23 +0000 (17:05 +0200)]
Remove unused GDK_HINT_POS

5 years agoRemove gravity from GdkGeometry
Benjamin Otte [Thu, 30 Jul 2020 03:02:30 +0000 (05:02 +0200)]
Remove gravity from GdkGeometry

It's always northwest

5 years agoRemove aspect ratio from GdkGeometry
Benjamin Otte [Thu, 30 Jul 2020 02:50:46 +0000 (04:50 +0200)]
Remove aspect ratio from GdkGeometry

It's unused.

5 years agogdk: Remove unused flags
Benjamin Otte [Thu, 30 Jul 2020 02:46:09 +0000 (04:46 +0200)]
gdk: Remove unused flags

5 years agogdk: Remove base_size and increment from GdkGeometry
Benjamin Otte [Thu, 30 Jul 2020 02:42:11 +0000 (04:42 +0200)]
gdk: Remove base_size and increment from GdkGeometry

It's unused.

5 years agoMerge branch 'wip/master.win.egl' into 'master'
Matthias Clasen [Thu, 30 Jul 2020 12:18:02 +0000 (12:18 +0000)]
Merge branch 'wip/master.win.egl' into 'master'

Add an EGL (OpenGL/ES 3) renderer for GTK+-4.x (using Google's ANGLE project) for Windows

Closes #105

See merge request GNOME/gtk!215

5 years agoMerge branch 'ricotz/for-master' into 'master'
Rico Tzschichholz [Thu, 30 Jul 2020 07:35:48 +0000 (07:35 +0000)]
Merge branch 'ricotz/for-master' into 'master'

a11y: Fix typo in GtkATContext::state-changed docs

See merge request GNOME/gtk!2320

5 years agoa11y: Fix typo in GtkATContext::state-changed docs
Rico Tzschichholz [Thu, 30 Jul 2020 07:06:49 +0000 (09:06 +0200)]
a11y: Fix typo in GtkATContext::state-changed docs

5 years agoGDK/Win32: Force GLES if running on ARM64
Chun-wei Fan [Tue, 7 May 2019 07:09:03 +0000 (00:09 -0700)]
GDK/Win32: Force GLES if running on ARM64

If GLES support is enabled on Windows, force GLES mode if we are running
on a ARM64 version of Windows (i.e. Windows 10 for ARM).

This is required as ARM64 versions of Windows only provide a software
implementation of OpenGL 1.1/1.2, which is not enough for our purposes.
Thus, we could make instead use the GLES support provided via Google's
libANGLE (which emulates OpenGL/ES 3 with Direct3D 9/11), so that we
can run GtkGLArea programs under OpenGL/ES in ARM64 versions of Windows.

Note that eventually we could update the libepoxy build files for Windows
to not check nor enable WGL when building for ARM64 Windows, as the WGL
items do not work, although they do build.

5 years agoOpenGL/ES: Fix 'R' and 'B' bits inverted on Windows
Chun-wei Fan [Tue, 31 Jul 2018 10:18:59 +0000 (18:18 +0800)]
OpenGL/ES: Fix 'R' and 'B' bits inverted on Windows

We need to use GL_BGRA instead of GL_RGBA when doing glReadPixels() on
EGL on Windows (ANGLE) so that the red and blue bits won't be displayed
inverted.

Also fix the logic where we determine whether to bit blit or redraw
everything.

5 years agodemos: Fix glarea demo on OpenGL/ES
Chun-wei Fan [Fri, 3 Aug 2018 07:54:48 +0000 (15:54 +0800)]
demos: Fix glarea demo on OpenGL/ES

Some implementations of the ES 1.00 shader (such as Google's ANGLE) do
not like the 'f' suffix for floats, so just drop it, as it should be
harmless to drop.

5 years agoAdd a EGL renderer (via ANGLE) for Windows
Chun-wei Fan [Tue, 31 Jul 2018 10:11:26 +0000 (18:11 +0800)]
Add a EGL renderer (via ANGLE) for Windows

This is for adding a EGL-based renderer which is done via the ANGLE
project, which translate EGL calls to Direct3D 9/11.  This is done as a
possible solution to issue #105, especially for cases where the needed
full GL extensions to map OpenGL to Direct3D is unavailable or
unreliable, or when the OpenGL implementation from the graphics drivers
are problematic.

To enable this, do the following:
-Build ANGLE and ensure the ANGLE libEGL.dll and libGLESv2.dll are
 available.  A sufficiently-recent ANGLE is needed for things to
 work correctly--note that the copy of ANGLE that is included in
 qtbase-5.10.1 is sufficient.  ANGLE is licensed under a BSD 3-clause
 license.
-Build libepoxy on Windows with EGL support enabled.
-Currently, prior to running GTK+ programs, the GDK_DEBUG envvar needs
 to be set with gl-gles as at least one of the flags.

Known issues:
-Only OpenGL ES 3 is supported, ANGLE's ES 2 does not support the needed
 extensions, notably GL_OES_vertex_array_object, but its ES 3 support is
 sufficient.
-There is no autodetection or fallback mechanism to enable using
 EGL/Angle automatically yet.  There are no plans to do this in this
 commit.

5 years agobuild: Check for EGL support in libepoxy on Windows
Chun-wei Fan [Fri, 22 Jun 2018 07:02:24 +0000 (15:02 +0800)]
build: Check for EGL support in libepoxy on Windows

...EGL support needs to be explicitly enabled during the build of
libepoxy on Windows as it is not enabled by default on Windows.

With this, we can add an EGL renderer for Windows that make use of
Google's libANGLE, which is a library that translates OpenGL/ES calls
to Direct3D 9/11, which will provide better hardware compatibility
on Windows and would act as one of the foundations to resolve issue #105.

5 years agoMerge branch 'display-cleanup' into 'master'
Matthias Clasen [Thu, 30 Jul 2020 03:55:23 +0000 (03:55 +0000)]
Merge branch 'display-cleanup' into 'master'

Display cleanup

See merge request GNOME/gtk!2319

5 years agoMerge branch 'surface-cleanup' into 'master'
Matthias Clasen [Thu, 30 Jul 2020 03:43:30 +0000 (03:43 +0000)]
Merge branch 'surface-cleanup' into 'master'

Surface cleanup

See merge request GNOME/gtk!2317

5 years agoMerge branch 'a11y-work' into 'master'
Matthias Clasen [Thu, 30 Jul 2020 03:28:02 +0000 (03:28 +0000)]
Merge branch 'a11y-work' into 'master'

A11y work

See merge request GNOME/gtk!2318

5 years agodocs: Don't refer to nonexisting functions
Matthias Clasen [Thu, 30 Jul 2020 03:00:57 +0000 (23:00 -0400)]
docs: Don't refer to nonexisting functions

gdk_surface_input_shape_combine_mask() no longer
exists.

5 years agogdk: Move default group api to the X11 backend
Matthias Clasen [Thu, 30 Jul 2020 02:55:19 +0000 (22:55 -0400)]
gdk: Move default group api to the X11 backend

This is the only place where it is implemented.

5 years agoa11y: Set an accessible role for GtkLevelBar
Matthias Clasen [Thu, 30 Jul 2020 02:10:56 +0000 (22:10 -0400)]
a11y: Set an accessible role for GtkLevelBar

Use the 'meter' role for GtkLevelBar, and set the
appropriate properties.

Update the docs and add a test.

5 years agoa11y: Set an accessible role for GtkExpander
Matthias Clasen [Thu, 30 Jul 2020 01:55:34 +0000 (21:55 -0400)]
a11y: Set an accessible role for GtkExpander

Use the button accessible role for GtkExpander
and set attributes as appropriate.

Update the documentation and add a test.

5 years agoa11y: Set accessible role for GtkLinkButton
Matthias Clasen [Thu, 30 Jul 2020 00:26:16 +0000 (20:26 -0400)]
a11y: Set accessible role for GtkLinkButton

Set the accessible role for GtkLinkButton to button.
We don't use the 'link' role since ARIA says "if it
behaves like a button, use 'button'".

Update docs and add a test.

This changes should not be neccessary, since
GtkLinkButton derives from GtkButton, see #2965.

5 years agoa11y: Set an accessible role for GtkTextView
Matthias Clasen [Wed, 29 Jul 2020 22:18:04 +0000 (18:18 -0400)]
a11y: Set an accessible role for GtkTextView

Use the text-box accessible role for GtkTextView
and set properties as appropriate.

Update the documentation and add a test.

5 years agoRename gdk_surface_queue_expose
Matthias Clasen [Thu, 30 Jul 2020 02:40:01 +0000 (22:40 -0400)]
Rename gdk_surface_queue_expose

We don't have expose events anymore; instead, there
is a ::render signal. So rename queue_expose to
queue_render to match.

Update all callers.

5 years agogdk: Stop exporting gdk_surface_freeze_updates
Matthias Clasen [Thu, 30 Jul 2020 02:30:44 +0000 (22:30 -0400)]
gdk: Stop exporting gdk_surface_freeze_updates

The only legitimate use for freezing the frame clock
is in GDK backends. Exporting this function for
applications makes no sense.

5 years agoiconbrowser: Add screenshots to appdata
Matthias Clasen [Thu, 30 Jul 2020 00:23:46 +0000 (20:23 -0400)]
iconbrowser: Add screenshots to appdata

appstream validation is picky and insists we have
at least on screenshot.

5 years agoUpdate our appdata files
Matthias Clasen [Wed, 29 Jul 2020 21:58:45 +0000 (17:58 -0400)]
Update our appdata files

Mention the new release in all our appdata files.

5 years agoicon-browser: Install desktop file and appdata
Matthias Clasen [Wed, 29 Jul 2020 21:42:49 +0000 (17:42 -0400)]
icon-browser: Install desktop file and appdata

That is needed to make the flatpak build in our
ci happy.

5 years agotestsuite: Skip the skipping
Matthias Clasen [Wed, 29 Jul 2020 20:35:36 +0000 (16:35 -0400)]
testsuite: Skip the skipping

meson 0.55 considers a test failed if we skip any cases.
Until that is fixed, just skip them quietly.

See https://github.com/mesonbuild/meson/issues/7515

5 years agotestsuite: Stop setting NO_AT_BRIDGE
Matthias Clasen [Wed, 29 Jul 2020 18:57:07 +0000 (14:57 -0400)]
testsuite: Stop setting NO_AT_BRIDGE

We are not paying attention to that environment
variable anymore.

5 years agoNEWS: Updates
Matthias Clasen [Wed, 29 Jul 2020 16:40:15 +0000 (12:40 -0400)]
NEWS: Updates

5 years agodocs: Mention workarea in the migration guide
Matthias Clasen [Wed, 29 Jul 2020 16:39:57 +0000 (12:39 -0400)]
docs: Mention workarea in the migration guide

5 years agoMerge branch 'wip/ditch-workarea' into 'master'
Matthias Clasen [Wed, 29 Jul 2020 16:24:32 +0000 (16:24 +0000)]
Merge branch 'wip/ditch-workarea' into 'master'

gdk/monitor: Remove gdk_monitor_work_area and GdkMonitor::work-area

See merge request GNOME/gtk!2316

5 years agogdk/monitor: Remove gdk_monitor_work_area and GdkMonitor::work-area
Jonas Ådahl [Wed, 29 Jul 2020 13:47:48 +0000 (15:47 +0200)]
gdk/monitor: Remove gdk_monitor_work_area and GdkMonitor::work-area

It's not a portable API, so remove it. The corresponding backend
specific functions are still available, if they were implemented, e.g.
gdk_macos_monitor_get_workarea() and gdk_x11_monitor_get_workarea().

5 years agoMerge branch 'better-doc-link-fix' into 'master'
Matthias Clasen [Wed, 29 Jul 2020 12:16:55 +0000 (12:16 +0000)]
Merge branch 'better-doc-link-fix' into 'master'

docs: Fix links in markdown content differently

See merge request GNOME/gtk!2315

5 years agodocs: Fix links in markdown content differently
Matthias Clasen [Wed, 29 Jul 2020 11:45:02 +0000 (07:45 -0400)]
docs: Fix links in markdown content differently

pandoc insists on using the xlink namespace for hrefs,
and the namespace setup doesn't carry over xi:includes.
My first fix was to tell pandoc to generate standalone
docbook documents, which makes it insert the xlink
namespace. But it also makes it wrap all sections and
chapters in articles, and that messes up our toc structure.

So, patch things up differently by stripping the xlink:
from hrefs via regex.

Yay for XML!

5 years agoMerge branch 'doc-fixes' into 'master'
Matthias Clasen [Wed, 29 Jul 2020 11:24:48 +0000 (11:24 +0000)]
Merge branch 'doc-fixes' into 'master'

Doc fixes

See merge request GNOME/gtk!2314

5 years agoMerge branch 'a11y-work' into 'master'
Matthias Clasen [Wed, 29 Jul 2020 11:19:22 +0000 (11:19 +0000)]
Merge branch 'a11y-work' into 'master'

A11y work

See merge request GNOME/gtk!2312

5 years agoUpdated Spanish translation
Daniel Mustieles [Wed, 29 Jul 2020 10:32:09 +0000 (12:32 +0200)]
Updated Spanish translation

5 years agoUpdated Spanish translation
Daniel Mustieles [Wed, 29 Jul 2020 10:31:27 +0000 (12:31 +0200)]
Updated Spanish translation

5 years agoUpdate Romanian translation
Florentina Mușat [Wed, 29 Jul 2020 10:33:19 +0000 (10:33 +0000)]
Update Romanian translation

5 years agodocs: Add a missing symbol
Matthias Clasen [Wed, 29 Jul 2020 02:39:31 +0000 (22:39 -0400)]
docs: Add a missing symbol

5 years agofilter: Typo fix
Matthias Clasen [Wed, 29 Jul 2020 02:20:19 +0000 (22:20 -0400)]
filter: Typo fix

5 years agofilechooser: Document the response.activate action
Matthias Clasen [Wed, 29 Jul 2020 02:19:59 +0000 (22:19 -0400)]
filechooser: Document the response.activate action

5 years agoa11y: Document GtkATContext::state-changed
Matthias Clasen [Wed, 29 Jul 2020 02:19:35 +0000 (22:19 -0400)]
a11y: Document GtkATContext::state-changed

5 years agodocs: Update the symbols list
Matthias Clasen [Wed, 29 Jul 2020 02:18:52 +0000 (22:18 -0400)]
docs: Update the symbols list

Make sure the sections file is in sync with what
we actually export.

5 years agodocs: Update private headers list
Matthias Clasen [Wed, 29 Jul 2020 02:08:37 +0000 (22:08 -0400)]
docs: Update private headers list

5 years agoa11y: Fix a few glitches in the role enum
Matthias Clasen [Wed, 29 Jul 2020 02:07:44 +0000 (22:07 -0400)]
a11y: Fix a few glitches in the role enum

When the enumeration was synced with the latest draft
of the ARIA spec, the math and note roles missed the boat.

5 years agoDocument gdk_device_tool_get_axes
Matthias Clasen [Wed, 29 Jul 2020 01:58:06 +0000 (21:58 -0400)]
Document gdk_device_tool_get_axes

5 years agogdk: Small doc fixup
Matthias Clasen [Wed, 29 Jul 2020 01:53:56 +0000 (21:53 -0400)]
gdk: Small doc fixup

We no longer use <!-- --> for plurals, gtk-doc is smart
enough to detect them without that.

5 years agoNEWS: Updates
Matthias Clasen [Wed, 29 Jul 2020 01:17:17 +0000 (21:17 -0400)]
NEWS: Updates

5 years agoMerge branch 'wip/carlosg/device-api-cleanup' into 'master'
Matthias Clasen [Tue, 28 Jul 2020 23:49:35 +0000 (23:49 +0000)]
Merge branch 'wip/carlosg/device-api-cleanup' into 'master'

Cleanups to device/event API

See merge request GNOME/gtk!2313

5 years agogdk: Conflate GDK devices
Carlos Garnacho [Tue, 28 Jul 2020 22:03:48 +0000 (00:03 +0200)]
gdk: Conflate GDK devices

Make GdkEvents hold a single GdkDevice. This device is closer to
the logical device conceptually, although it must be sufficient for
device checks (i.e. GdkInputSource), which makes it similar to the
physical devices.

Make the logical devices have a more accurate GdkInputSource where
needed, and conflate the event devices altogether.

5 years agogdk: Drop source_device argument from _gdk_display_device_grab_update()
Carlos Garnacho [Tue, 28 Jul 2020 21:00:02 +0000 (23:00 +0200)]
gdk: Drop source_device argument from _gdk_display_device_grab_update()

It's just passed around and used nowhere.

5 years agogdk: Make events hold an axis array matching GdkAxisUse
Carlos Garnacho [Tue, 28 Jul 2020 17:38:24 +0000 (19:38 +0200)]
gdk: Make events hold an axis array matching GdkAxisUse

Instead of doing device-specific translations of array positions,
use GdkAxisUse as an array index right away.

5 years agogdk: Make GdkDevice axis API internal
Carlos Garnacho [Tue, 28 Jul 2020 14:21:47 +0000 (16:21 +0200)]
gdk: Make GdkDevice axis API internal

All outside interaction happens through gdk_event_get_axis(), no
device poking is necessary, nor axis to array index translations.

5 years agogdk: Remove gdk_device_get_axes()
Carlos Garnacho [Tue, 28 Jul 2020 15:10:45 +0000 (17:10 +0200)]
gdk: Remove gdk_device_get_axes()

Besides the implicit x/y assumptions, devices don't have axes. Those
are actually provided by the GdkDeviceTool driving the device, and
different tools may have different axes.

It does not make sense to offer this API that can change beneath
someone's feet, we now have gdk_device_tool_get_axes() which is static
to the tool.

5 years agoinspector: Show tool axes, instead of device axes
Carlos Garnacho [Tue, 28 Jul 2020 15:07:48 +0000 (17:07 +0200)]
inspector: Show tool axes, instead of device axes

We are moving away from the latter as they are inconsistent with
Wayland. Make the inspector introspect known tools and their info,
instead.

5 years agoa11y: Set an accessible role for GtkPasswordEntry
Matthias Clasen [Tue, 28 Jul 2020 22:23:57 +0000 (18:23 -0400)]
a11y: Set an accessible role for GtkPasswordEntry

Use the text-box accessible role for GtkPasswordEntry.
And set properties as appropriate.

Update the documentation and add a test.

5 years agoa11y: Set an accessible role for GtkSearchEntry
Matthias Clasen [Tue, 28 Jul 2020 22:15:01 +0000 (18:15 -0400)]
a11y: Set an accessible role for GtkSearchEntry

Use the searchbox accessible role for GtkSearchEntry.
And set properties as appropriate.

Update the documentation and add a test.

5 years agoa11y: Set an accessible role for GtkLabel
Matthias Clasen [Tue, 28 Jul 2020 20:53:19 +0000 (16:53 -0400)]
a11y: Set an accessible role for GtkLabel

Use the label accessible role for GtkLabel. ARIA has some
ominous wording about it going way, but while we have it,
GtkLabel is the obvious candidate for carrying it.

Update the documentation and add a test.

5 years agoa11y: Add tests for mnemonics
Matthias Clasen [Tue, 28 Jul 2020 20:34:01 +0000 (16:34 -0400)]
a11y: Add tests for mnemonics

We set up labelled-by accessible relations when
a label is set as mnemonic widget. Verify that that
happens as expected.

5 years agoa11y: Set an accessible role for GtkEntry
Matthias Clasen [Tue, 28 Jul 2020 20:11:45 +0000 (16:11 -0400)]
a11y: Set an accessible role for GtkEntry

Use the text-box accessible role for GtkEntry and
set the placeholder and read-only accessible properties.

Update the documentation and add tests.

5 years agoa11y: Add a scrollbar relation test
Matthias Clasen [Tue, 28 Jul 2020 20:02:06 +0000 (16:02 -0400)]
a11y: Add a scrollbar relation test

Check that GtkScrolledWindow sets up the expected
relations between its scrollbars and child.

5 years agoa11y: Set up controls relations for scrollbars
Matthias Clasen [Tue, 28 Jul 2020 19:56:30 +0000 (15:56 -0400)]
a11y: Set up controls relations for scrollbars

GtkScrolledWindow knows what its scrollbars control,
so set up the accessible relations for this.

5 years agoa11y: Set accessible roles for GtkImage and GtkPicture
Matthias Clasen [Tue, 28 Jul 2020 19:44:12 +0000 (15:44 -0400)]
a11y: Set accessible roles for GtkImage and GtkPicture

Use the img accessible role for these.
Also update the documentation and add tests.

5 years agogdk: Add gdk_seat_get_tools() API call
Carlos Garnacho [Tue, 28 Jul 2020 14:51:41 +0000 (16:51 +0200)]
gdk: Add gdk_seat_get_tools() API call

There's GdkSeat::tool-added and ::tool-removed, but there's no
API to query the known tools. Add this call.

5 years agoMerge branch 'wip/chergert/bump-sysprof-abi' into 'master'
Matthias Clasen [Tue, 28 Jul 2020 20:33:33 +0000 (20:33 +0000)]
Merge branch 'wip/chergert/bump-sysprof-abi' into 'master'

build: bump to sysprof 4 ABI

See merge request GNOME/gtk!2192

5 years agobuild: bump to sysprof 4 ABI
Christian Hergert [Sat, 4 Jul 2020 18:40:21 +0000 (11:40 -0700)]
build: bump to sysprof 4 ABI

Sysprof has moved to a new ABI which removes GLib from the capture library
so that GLib itself can link against sysprof-capture.

This bumps the library ABI so we can keep things coordinated between all
the new tracing layers in the stack.

5 years agoMerge branch 'ebassi/for-master' into 'master'
Matthias Clasen [Tue, 28 Jul 2020 16:30:47 +0000 (16:30 +0000)]
Merge branch 'ebassi/for-master' into 'master'

Ebassi/for master

See merge request GNOME/gtk!2311

5 years agoa11y: Update the valuetext attribute of GtkProgressBar
Emmanuele Bassi [Tue, 28 Jul 2020 12:27:50 +0000 (13:27 +0100)]
a11y: Update the valuetext attribute of GtkProgressBar

Since progress bars can have a label, we should propagate that information
to ATs whenever it's set.

5 years agoa11y: Add an explicit "reset to default" method
Emmanuele Bassi [Tue, 28 Jul 2020 15:46:53 +0000 (16:46 +0100)]
a11y: Add an explicit "reset to default" method

In some cases we explicitly want to unset an accessible attribute; for
instance, an accessible property is gated on a widget property, and if
the widget property gets unset, the accessible property should be reset.

5 years agoa11y: Add proper error reporting to value collection
Emmanuele Bassi [Tue, 28 Jul 2020 15:41:44 +0000 (16:41 +0100)]
a11y: Add proper error reporting to value collection

We're currently overloading NULL to mean both "this value is undefined,
and should be reset to its default" and "the value collection failed".
Let's do error reporting right, by using GError to mean "the collection
failed, for this specific reason"; then, we can use a NULL return value
to signal that the accessible attribute should be reset to its default
value.

This is only relevant for pointer-sized attribute values: strings,
references, and reference lists; numeric, boolean, tristate, and token
values either cannot be undefined, or have a specific "undefined" value.

5 years agoa11y: Fix the error message for the attribute test macros
Emmanuele Bassi [Tue, 28 Jul 2020 14:49:14 +0000 (15:49 +0100)]
a11y: Fix the error message for the attribute test macros

We're missing a closing parenthesis.

5 years agoa11y: Use undefined as default for string attributes
Emmanuele Bassi [Tue, 28 Jul 2020 12:27:05 +0000 (13:27 +0100)]
a11y: Use undefined as default for string attributes

Instead of an empty string.